<template>
  <a-divider
    v-show="isShow(properties)"
    :id="id"
    v-bind="attrs"
    class="dragItem"
    style="position: relative; margin: 0px; padding: 16px 0"
  >
    {{ properties.label }}
  </a-divider>
</template>
<script>
import BaseDragItem from './BaseDragItem'
export default {
  name: 'DividerItem',
  extends: BaseDragItem,
  data() {
    return {}
  },
  methods: {
    buildHtml(disabled, space) {
      let html = space + '<a-divider\r\n'
      if (this.properties.ifCondition) {
        html = html + space + '  v-if="' + this.properties.ifCondition + '"\r\n'
      }
      html = html + this.buildHtmlAttr(disabled, this.attrs, space + '  ')
      html = html + space + '>\r\n'
      html = html + space + '    ' + this.properties.label + '\r\n'
      html = html + space + '</a-divider>'
      return html
    },
    getData(array, filter) {
      array.push({
        id: this.id,
        type: this.type,
        attrs: this.attrs,
        extendAttrs: this.extendAttrs,
        properties: this.properties
      })
    }
  }
}
</script>
